<?php

class MarketingModel extends BaseModel
{
    public static function openEmail($campaignId, $email)
    {
        $sql = 'INSERT INTO marketing (campaign_id, email, created_at, created_date) VALUES (:campaign_id, :email, NOW(), CURDATE())';
        $command = Yii::app()->db->createCommand($sql);
        $command->bindParam(':campaign_id', $campaignId);
        $command->bindParam(':email', $email);
        $command->execute();
    }
}
